<ion-view hide-nav-bar="true" title="发动态">
    <ion-header-bar class="bar bar-header" >
        <a href="javascript:history.back(-1)" class="button button-icon icon ion-ios-arrow-back" nav-direction="back" style="color: #ff9461;"></a>
        <a class="button" ng-click="prepareDynamic()" style="background: #ff9461;color: #ffffff;">发表</a>
    </ion-header-bar>
    <ion-content>
        <div class="container">
            <div class="entrust-create-screen padding">
                <div class="student-box" style="height: 300px;width: 100%;">
                    <div ng-show="vm.studentList.length < 1">
                        <p >您的宝宝还未绑定班级呢！</p>
                    </div>
                    <div class="row row-wrap" ng-show="vm.studentList.length > 0">
                        <div class="col col-50" ng-repeat="item in vm.studentList track by $index">
                            <div class="card card-facebook margin-0" data-studentId="{{item.memberId}}" data-classId="{{item.classId}}" data-studentName="{{item.memberName}}" data-studentAvatarPath="{{item.avatarPath}}" data-teacherName="{{item.teacherName}}">
                                <div class="item item-avatar-center">
                                    <img ng-src="{{item.avatarPath}}">
                                    <h2 class="ng-binding">{{item.memberName}}</h2>
                                </div>
                                <div class="item item-divider ng-binding">班主任：{{item.teacherName}}</div>
                                <div class="item item-divider ng-binding">班级名称：{{item.className}}</div>
                                <div class="choose-chile-div-choose-icon ion ion-checkmark"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <button class="button button-full ion ion-checkmark" style="background: rgba(218, 224, 223, 0.53);color: #000;font-size: 3rem;"
                        id="choose-student-btn"></button>
            </div>
            <div class="content">
                <div class="padding">
                    <p class="entrust-create-flow" ng-show="!vm.isEdit"><label>01</label>&nbsp;&nbsp;选择班级能浏览这条动态</p>
                    <div class="row row-wrap">
                        <div class="col col-50" ng-repeat="item in vm.chooseStudentList track by $index">
                            <div class="card card-facebook margin-0">
                                <div class="item item-avatar-center">
                                    <img ng-src="{{item.studentAvatarPath}}">
                                    <h2 class="ng-binding">{{item.studentName}}</h2>
                                </div>
                                <div class="item item-divider ng-binding">
                                    班主任：{{item.teacherName}}
                                </div>
                                <div ng-show="!vm.isEdit" class="choose-chile-div-close ion ion-close" ng-click="removeStudent($index)"></div>
                            </div>
                        </div>
                        <div class="col col-50" ng-show="!vm.isEdit">
                            <div class="card card-facebook margin-0">
                                <div class="item item-avatar-center" id="choose-child-btn">
                                    <i class="ion ion-plus" style="font-size: 1.5rem;"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding">
                    <p class="entrust-create-flow"><label>02</label>&nbsp;&nbsp;输入动态正文：</p>
                    <div style="padding-bottom: 10px;border-bottom: 1px solid #cccccc;">
                        <textarea style="width: 100%;line-height: 24px;" placeholder="在这里呼入少于50个字的标题..." ng-model="vm.dynamic.title"
                                  rows="1" ng-trim="false" maxlength="50" ng-Required="true" name="title"></textarea>
                    </div>
                    <div style="padding: 20px 0px;">
                        <textarea style="width: 100%;line-height: 24px;" placeholder="分享你和孩子的新鲜事儿...." ng-model="vm.dynamic.content"
                                  rows="15" ng-trim="false" maxlength="2000" ng-Required="true" name="description"></textarea>
                    </div>
                    <div class="dynamic-create-img">
                        <dynamic-upload-pic ng-repeat="per in vm.imgUrl track by $index"></dynamic-upload-pic>
                    </div>
                </div>
            </div>
        </div>
        <div id="resultHtml"></div>
    </ion-content>
    <ion-footer-bar class="bar bar-footer" style="background: rgba(167, 164, 164, 0.16);">
        <div class="buttons">
            <button style="color: #a0a0a0;" ng-click="chooseImg()" class="button button-icon ion-image"></button>
        </div>
    </ion-footer-bar>
</ion-view>